home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EuroCD 3
/
EuroCD 3.iso
/
Programming
/
vbcc
/
pasm
/
predefs.c
< prev
next >
Wrap
Text File
|
1998-06-24
|
25KB
|
505 lines
/* $VER: pasm predefs.c V0.7 (21.11.97)
*
* This file is part of pasm, a portable PowerPC assembler.
* Copyright (c) 1997 Frank Wille
*
* pasm is freeware and part of the portable and retargetable ANSI C
* compiler vbcc, copyright (c) 1995-97 by Volker Barthelmann.
* pasm may be freely redistributed as long as no modifications are
* made and nothing is charged for it. Non-commercial usage is allowed
* without any restrictions.
* EVERY PRODUCT OR PROGRAM DERIVED DIRECTLY FROM MY SOURCE MAY NOT BE
* SOLD COMMERCIALLY WITHOUT PERMISSION FROM THE AUTHOR.
*
*
* v0.7 (21.11.97) phx
* Missing extended mnemonics: mr. and not.
* Fixed out of range warnings in extrwi, inslwi, rotwri and srwi.
* v0.6 (26.10.97) phx
* @object and @function were removed from stdsets. They are
* always defined during assembler initialization (pass.c).
* v0.4 (29.04.97) phx
* Renamed .toc into .tocd.
* Base relative addressing mode defaults to .baserel .tocd,2
* v0.2 (24.03.97) phx
* Writes ELF object for 32-bit PowerPC big-endian. Either absolute
* or ELF output format may be selected. ELF is default for all
* currently supported platforms. PPCasm supports nine different
* relocation types (there are much more...).
* Compiles and works also under NetBSD/amiga (68k).
* Changed function declaration to 'new style' in all sources
* (to avoid problems with '...' for example).
* Changed type of predefinition texts from character-constant
* to character-array, to avoid bus errors on systems with
* memory protection.
* .rwdata and .rdata section predefinitions deleted.
* v0.1 (11.03.97) phx
* First test version with all PowerPC instructions and most
* important directives. Only raw, absolute output.
* I'm still uncertain about the sense of the sections .rodata,
* .rdata and .rwdata (where .rodata and .rdata seem indentical
* anyway). .toc isn't supported. .bss can't be activated by its
* name, because there is a directive called .bss.
* Some 64-bit extended macros are missing, e.g. for shifting.
* v0.0 (21.02.97) phx
* File created.
*/
char stdsects[] =
".section .text,\"crx3\"\n"
".section .data,\"drw3\"\n"
".section .bss,\"urw3\"\n"
".section .rodata,\"dr3\"\n"
".section .tocd,\"drw3\"\n"
".text\n" /* activate .text section */
".baserel .tocd,2\n"; /* default base relative mode = TOC */
char stdsets[] =
".set r0,0\n.set r1,1\n.set r2,2\n.set r3,3\n"
".set r4,4\n.set r5,5\n.set r6,6\n.set r7,7\n"
".set r8,8\n.set r9,9\n.set r10,10\n.set r11,11\n"
".set r12,12\n.set r13,13\n.set r14,14\n.set r15,15\n"
".set r16,16\n.set r17,17\n.set r18,18\n.set r19,19\n"
".set r20,20\n.set r21,21\n.set r22,22\n.set r23,23\n"
".set r24,24\n.set r25,25\n.set r26,26\n.set r27,27\n"
".set r28,28\n.set r29,29\n.set r30,30\n.set r31,31\n"
".set f0,0\n.set f1,1\n.set f2,2\n.set f3,3\n"
".set f4,4\n.set f5,5\n.set f6,6\n.set f7,7\n"
".set f8,8\n.set f9,9\n.set f10,10\n.set f11,11\n"
".set f12,12\n.set f13,13\n.set f14,14\n.set f15,15\n"
".set f16,16\n.set f17,17\n.set f18,18\n.set f19,19\n"
".set f20,20\n.set f21,21\n.set f22,22\n.set f23,23\n"
".set f24,24\n.set f25,25\n.set f26,26\n.set f27,27\n"
".set f28,28\n.set f29,29\n.set f30,30\n.set f31,31\n"
".set cr0,0\n.set cr1,1\n.set cr2,2\n.set cr3,3\n"
".set cr4,4\n.set cr5,5\n.set cr6,6\n.set cr7,7\n"
".set lt,0\n.set gt,1\n.set eq,2\n.set so,3\n.set un,3\n"
".set sp,1\n.set rtoc,2\n.set fp,31\n.set fpscr,0\n"
".set xer,1\n.set lr,8\n.set ctr,9\n";
char *xmnemos[] = {
".macro subi\n addi \\1,\\2,-(\\3)\n.endm\n",
".macro subis\n addis \\1,\\2,-(\\3)\n.endm\n",
".macro subic\n addic \\1,\\2,-(\\3)\n.endm\n",
".macro subic.\n addic. \\1,\\2,-(\\3)\n.endm\n",
".macro sub\n subf \\1,\\3,\\2\n.endm\n",
".macro sub.\n subf. \\1,\\3,\\2\n.endm\n",
".macro subo\n subfo \\1,\\3,\\2\n.endm\n",
".macro subo.\n subfo. \\1,\\3,\\2\n.endm\n",
".macro subc\n subfc \\1,\\3,\\2\n.endm\n",
".macro subc.\n subfc. \\1,\\3,\\2\n.endm\n",
".macro subco\n subfco \\1,\\3,\\2\n.endm\n",
".macro subco.\n subfco. \\1,\\3,\\2\n.endm\n",
".macro cmpwi\n.ifeq $NARG-2\n cmpi 0,0,\\1,\\2\n"
".else\n cmpi \\1,0,\\2,\\3\n.endif\n.endm\n",
".macro cmpw\n.ifeq $NARG-2\n cmp 0,0,\\1,\\2\n"
".else\n cmp \\1,0,\\2,\\3\n.endif\n.endm\n",
".macro cmplwi\n.ifeq $NARG-2\n cmpli 0,0,\\1,\\2\n"
".else\n cmpli \\1,0,\\2,\\3\n.endif\n.endm\n",
".macro cmplw\n.ifeq $NARG-2\n cmpl 0,0,\\1,\\2\n"
".else\n cmpl \\1,0,\\2,\\3\n.endif\n.endm\n",
".macro cmpdi\n.ifeq $NARG-2\n cmpi 0,1,\\1,\\2\n"
".else\n cmpi \\1,1,\\2,\\3\n.endif\n.endm\n",
".macro cmpd\n.ifeq $NARG-2\n cmp 0,1,\\1,\\2\n"
".else\n cmp \\1,1,\\2,\\3\n.endif\n.endm\n",
".macro cmpldi\n.ifeq $NARG-2\n cmpli 0,1,\\1,\\2\n"
".else\n cmpli \\1,1,\\2,\\3\n.endif\n.endm\n",
".macro cmpld\n.ifeq $NARG-2\n cmpl 0,1,\\1,\\2\n"
".else\n cmpl \\1,1,\\2,\\3\n.endif\n.endm\n",
".macro extlwi\n rlwinm \\1,\\2,\\4,0,(\\3)-1\n.endm\n",
".macro extlwi.\n rlwinm. \\1,\\2,\\4,0,(\\3)-1\n.endm\n",
".macro extrwi\n rlwinm \\1,\\2,((\\4)+(\\3))&31,32-(\\3),31\n.endm\n",
".macro extrwi.\n rlwinm. \\1,\\2,((\\4)+(\\3))&31,32-(\\3),31\n.endm\n",
".macro inslwi\n rlwimi \\1,\\2,(32-(\\4))&31,\\4,((\\4)+(\\3))-1\n.endm\n",
".macro inslwi.\n rlwimi. \\1,\\2,(32-(\\4))&31,\\4,((\\4)+(\\3))-1\n.endm\n",
".macro insrwi\n rlwimi \\1,\\2,32-((\\4)+(\\3)),\\4,((\\4)+(\\3))-1\n.endm\n",
".macro insrwi.\n rlwimi. \\1,\\2,32-((\\4)+(\\3)),\\4,((\\4)+(\\3))-1\n.endm\n",
".macro rotlwi\n rlwinm \\1,\\2,\\3,0,31\n.endm\n",
".macro rotlwi.\n rlwinm. \\1,\\2,\\3,0,31\n.endm\n",
".macro rotrwi\n rlwinm \\1,\\2,(32-(\\3))&31,0,31\n.endm\n",
".macro rotrwi.\n rlwinm. \\1,\\2,(32-(\\3))&31,0,31\n.endm\n",
".macro rotlw\n rlwnm \\1,\\2,\\3,0,31\n.endm\n",
".macro rotlw.\n rlwnm. \\1,\\2,\\3,0,31\n.endm\n",
".macro slwi\n rlwinm \\1,\\2,\\3,0,31-(\\3)\n.endm\n",
".macro slwi.\n rlwinm. \\1,\\2,\\3,0,31-(\\3)\n.endm\n",
".macro srwi\n rlwinm \\1,\\2,(32-(\\3))&31,\\3,31\n.endm\n",
".macro srwi.\n rlwinm. \\1,\\2,(32-(\\3))&31,\\3,31\n.endm\n",
".macro clrlwi\n rlwinm \\1,\\2,0,\\3,31\n.endm\n",
".macro clrlwi.\n rlwinm. \\1,\\2,0,\\3,31\n.endm\n",
".macro clrrwi\n rlwinm \\1,\\2,0,0,31-(\\3)\n.endm\n",
".macro clrrwi.\n rlwinm. \\1,\\2,0,0,31-(\\3)\n.endm\n",
".macro clrlslwi\n rlwinm \\1,\\2,\\4,(\\3)-(\\4),31-(\\4)\n.endm\n",
".macro clrlslwi.\n rlwinm. \\1,\\2,\\4,(\\3)-(\\4),31-(\\4)\n.endm\n",
".macro bt\n bc\\0 12,\\1,\\2\n.endm\n",
".macro bf\n bc\\0 4,\\1,\\2\n.endm\n",
".macro bdnz\n bc\\0 16,0,\\1\n.endm\n",
".macro bdnzt\n bc\\0 8,\\1,\\2\n.endm\n",
".macro bdnzf\n bc\\0 0,\\1,\\2\n.endm\n",
".macro bdz\n bc\\0 18,0,\\1\n.endm\n",
".macro bdzt\n bc\\0 10,\\1,\\2\n.endm\n",
".macro bdzf\n bc\\0 2,\\1,\\2\n.endm\n",
".macro bta\n bca\\0 12,\\1,\\2\n.endm\n",
".macro bfa\n bca\\0 4,\\1,\\2\n.endm\n",
".macro bdnza\n bca\\0 16,0,\\1\n.endm\n",
".macro bdnzta\n bca\\0 8,\\1,\\2\n.endm\n",
".macro bdnzfa\n bca\\0 0,\\1,\\2\n.endm\n",
".macro bdza\n bca\\0 18,0,\\1\n.endm\n",
".macro bdzta\n bca\\0 10,\\1,\\2\n.endm\n",
".macro bdzfa\n bca\\0 2,\\1,\\2\n.endm\n",
".macro blr\n bclr 20,0\n.endm\n",
".macro btlr\n bclr\\0 12,\\1\n.endm\n",
".macro bflr\n bclr\\0 4,\\1\n.endm\n",
".macro bdnzlr\n bclr\\0 16,0\n.endm\n",
".macro bdnztlr\n bclr\\0 8,\\1\n.endm\n",
".macro bdnzflr\n bclr\\0 0,\\1\n.endm\n",
".macro bdzlr\n bclr\\0 18,0\n.endm\n",
".macro bdztlr\n bclr\\0 10,\\1\n.endm\n",
".macro bdzflr\n bclr\\0 2,\\1\n.endm\n",
".macro bctr\n bcctr 20,0\n.endm\n",
".macro btctr\n bcctr\\0 12,\\1\n.endm\n",
".macro bfctr\n bcctr\\0 4,\\1\n.endm\n",
".macro btl\n bcl\\0 12,\\1,\\2\n.endm\n",
".macro bfl\n bcl\\0 4,\\1,\\2\n.endm\n",
".macro bdnzl\n bcl\\0 16,0,\\1\n.endm\n",
".macro bdnztl\n bcl\\0 8,\\1,\\2\n.endm\n",
".macro bdnzfl\n bcl\\0 0,\\1,\\2\n.endm\n",
".macro bdzl\n bcl\\0 18,0,\\1\n.endm\n",
".macro bdztl\n bcl\\0 10,\\1,\\2\n.endm\n",
".macro bdzfl\n bcl\\0 2,\\1,\\2\n.endm\n",
".macro btla\n bcla\\0 12,\\1,\\2\n.endm\n",
".macro bfla\n bcla\\0 4,\\1,\\2\n.endm\n",
".macro bdnzla\n bcla\\0 16,0,\\1\n.endm\n",
".macro bdnztla\n bcla\\0 8,\\1,\\2\n.endm\n",
".macro bdnzfla\n bcla\\0 0,\\1,\\2\n.endm\n",
".macro bdzla\n bcla\\0 18,0,\\1\n.endm\n",
".macro bdztla\n bcla\\0 10,\\1,\\2\n.endm\n",
".macro bdzfla\n bcla\\0 2,\\1,\\2\n.endm\n",
".macro blrl\n bclrl 20,0\n.endm\n",
".macro btlrl\n bclrl\\0 12,\\1\n.endm\n",
".macro bflrl\n bclrl\\0 4,\\1\n.endm\n",
".macro bdnzlrl\n bclrl\\0 16,0\n.endm\n",
".macro bdnztlrl\n bclrl\\0 8,\\1\n.endm\n",
".macro bdnzflrl\n bclrl\\0 0,\\1\n.endm\n",
".macro bdzlrl\n bclrl\\0 18,0\n.endm\n",
".macro bdztlrl\n bclrl\\0 10,\\1\n.endm\n",
".macro bdzflrl\n bclrl\\0 2,\\1\n.endm\n",
".macro bctrl\n bcctrl 20,0\n.endm\n",
".macro btctrl\n bcctrl\\0 12,\\1\n.endm\n",
".macro bfctrl\n bcctrl\\0 4,\\1\n.endm\n",
".macro blt\n.ifeq $NARG-1\n bc\\0 12,0,\\1\n.else\n"
"bc\\0 12,4*(\\1)+0,\\2\n.endif\n.endm\n",
".macro ble\n.ifeq $NARG-1\n bc\\0 4,1,\\1\n.else\n"
"bc\\0 4,4*(\\1)+1,\\2\n.endif\n.endm\n",
".macro beq\n.ifeq $NARG-1\n bc\\0 12,2,\\1\n.else\n"
"bc\\0 12,4*(\\1)+2,\\2\n.endif\n.endm\n",
".macro bge\n.ifeq $NARG-1\n bc\\0 4,0,\\1\n.else\n"
"bc\\0 4,4*(\\1)+0,\\2\n.endif\n.endm\n",
".macro bgt\n.ifeq $NARG-1\n bc\\0 12,1,\\1\n.else\n"
"bc\\0 12,4*(\\1)+1,\\2\n.endif\n.endm\n",
".macro bnl\n.ifeq $NARG-1\n bc\\0 4,0,\\1\n.else\n"
"bc\\0 4,4*(\\1)+0,\\2\n.endif\n.endm\n",
".macro bne\n.ifeq $NARG-1\n bc\\0 4,2,\\1\n.else\n"
"bc\\0 4,4*(\\1)+2,\\2\n.endif\n.endm\n",
".macro bng\n.ifeq $NARG-1\n bc\\0 4,1,\\1\n.else\n"
"bc\\0 4,4*(\\1)+1,\\2\n.endif\n.endm\n",
".macro bso\n.ifeq $NARG-1\n bc\\0 12,3,\\1\n.else\n"
"bc\\0 12,4*(\\1)+3,\\2\n.endif\n.endm\n",
".macro bns\n.ifeq $NARG-1\n bc\\0 4,3,\\1\n.else\n"
"bc\\0 4,4*(\\1)+3,\\2\n.endif\n.endm\n",
".macro bun\n.ifeq $NARG-1\n bc\\0 12,3,\\1\n.else\n"
"bc\\0 12,4*(\\1)+3,\\2\n.endif\n.endm\n",
".macro bnu\n.ifeq $NARG-1\n bc\\0 4,3,\\1\n.else\n"
"bc\\0 4,4*(\\1)+3,\\2\n.endif\n.endm\n",
".macro blta\n.ifeq $NARG-1\n bca\\0 12,0,\\1\n.else\n"
"bca\\0 12,4*(\\1)+0,\\2\n.endif\n.endm\n",
".macro blea\n.ifeq $NARG-1\n bca\\0 4,1,\\1\n.else\n"
"bca\\0 4,4*(\\1)+1,\\2\n.endif\n.endm\n",
".macro beqa\n.ifeq $NARG-1\n bca\\0 12,2,\\1\n.else\n"
"bca\\0 12,4*(\\1)+2,\\2\n.endif\n.endm\n",
".macro bgea\n.ifeq $NARG-1\n bca\\0 4,0,\\1\n.else\n"
"bca\\0 4,4*(\\1)+0,\\2\n.endif\n.endm\n",
".macro bgta\n.ifeq $NARG-1\n bca\\0 12,1,\\1\n.else\n"
"bca\\0 12,4*(\\1)+1,\\2\n.endif\n.endm\n",
".macro bnla\n.ifeq $NARG-1\n bca\\0 4,0,\\1\n.else\n"
"bca\\0 4,4*(\\1)+0,\\2\n.endif\n.endm\n",
".macro bnea\n.ifeq $NARG-1\n bca\\0 4,2,\\1\n.else\n"
"bca\\0 4,4*(\\1)+2,\\2\n.endif\n.endm\n",
".macro bnga\n.ifeq $NARG-1\n bca\\0 4,1,\\1\n.else\n"
"bca\\0 4,4*(\\1)+1,\\2\n.endif\n.endm\n",
".macro bsoa\n.ifeq $NARG-1\n bca\\0 12,3,\\1\n.else\n"
"bca\\0 12,4*(\\1)+3,\\2\n.endif\n.endm\n",
".macro bnsa\n.ifeq $NARG-1\n bca\\0 4,3,\\1\n.else\n"
"bca\\0 4,4*(\\1)+3,\\2\n.endif\n.endm\n",
".macro buna\n.ifeq $NARG-1\n bca\\0 12,3,\\1\n.else\n"
"bca\\0 12,4*(\\1)+3,\\2\n.endif\n.endm\n",
".macro bnua\n.ifeq $NARG-1\n bca\\0 4,3,\\1\n.else\n"
"bca\\0 4,4*(\\1)+3,\\2\n.endif\n.endm\n",
".macro bltlr\n.ifeq $NARG-1\n bclr\\0 12,4*(\\1)+0\n"
".else\n bclr\\0 12,0\n.endif\n.endm\n",
".macro blelr\n.ifeq $NARG-1\n bclr\\0 4,4*(\\1)+1\n"
".else\n bclr\\0 4,1\n.endif\n.endm\n",
".macro beqlr\n.ifeq $NARG-1\n bclr\\0 12,4*(\\1)+2\n"
".else\n bclr\\0 12,2\n.endif\n.endm\n",
".macro bgelr\n.ifeq $NARG-1\n bclr\\0 4,4*(\\1)+0\n"
".else\n bclr\\0 4,0\n.endif\n.endm\n",
".macro bgtlr\n.ifeq $NARG-1\n bclr\\0 12,4*(\\1)+1\n"
".else\n bclr\\0 12,1\n.endif\n.endm\n",
".macro bnllr\n.ifeq $NARG-1\n bclr\\0 4,4*(\\1)+0\n"
".else\n bclr\\0 4,0\n.endif\n.endm\n",
".macro bnelr\n.ifeq $NARG-1\n bclr\\0 4,4*(\\1)+2\n"
".else\n bclr\\0 4,2\n.endif\n.endm\n",
".macro bnglr\n.ifeq $NARG-1\n bclr\\0 4,4*(\\1)+1\n"
".else\n bclr\\0 4,1\n.endif\n.endm\n",
".macro bsolr\n.ifeq $NARG-1\n bclr\\0 12,4*(\\1)+3\n"
".else\n bclr\\0 12,3\n.endif\n.endm\n",
".macro bnslr\n.ifeq $NARG-1\n bclr\\0 4,4*(\\1)+3\n"
".else\n bclr\\0 4,3\n.endif\n.endm\n",
".macro bunlr\n.ifeq $NARG-1\n bclr\\0 12,4*(\\1)+3\n"
".else\n bclr\\0 12,3\n.endif\n.endm\n",
".macro bnulr\n.ifeq $NARG-1\n bclr\\0 4,4*(\\1)+3\n"
".else\n bclr\\0 4,3\n.endif\n.endm\n",
".macro bltctr\n.ifeq $NARG-1\n bcctr\\0 12,4*(\\1)+0\n"
".else\n bcctr\\0 12,0\n.endif\n.endm\n",
".macro blectr\n.ifeq $NARG-1\n bcctr\\0 4,4*(\\1)+1\n"
".else\n bcctr\\0 4,1\n.endif\n.endm\n",
".macro beqctr\n.ifeq $NARG-1\n bcctr\\0 12,4*(\\1)+2\n"
".else\n bcctr\\0 12,2\n.endif\n.endm\n",
".macro bgectr\n.ifeq $NARG-1\n bcctr\\0 4,4*(\\1)+0\n"
".else\n bcctr\\0 4,0\n.endif\n.endm\n",
".macro bgtctr\n.ifeq $NARG-1\n bcctr\\0 12,4*(\\1)+1\n"
".else\n bcctr\\0 12,1\n.endif\n.endm\n",
".macro bnlctr\n.ifeq $NARG-1\n bcctr\\0 4,4*(\\1)+0\n"
".else\n bcctr\\0 4,0\n.endif\n.endm\n",
".macro bnectr\n.ifeq $NARG-1\n bcctr\\0 4,4*(\\1)+2\n"
".else\n bcctr\\0 4,2\n.endif\n.endm\n",
".macro bngctr\n.ifeq $NARG-1\n bcctr\\0 4,4*(\\1)+1\n"
".else\n bcctr\\0 4,1\n.endif\n.endm\n",
".macro bsoctr\n.ifeq $NARG-1\n bcctr\\0 12,4*(\\1)+3\n"
".else\n bcctr\\0 12,3\n.endif\n.endm\n",
".macro bnsctr\n.ifeq $NARG-1\n bcctr\\0 4,4*(\\1)+3\n"
".else\n bcctr\\0 4,3\n.endif\n.endm\n",
".macro bunctr\n.ifeq $NARG-1\n bcctr\\0 12,4*(\\1)+3\n"
".else\n bcctr\\0 12,3\n.endif\n.endm\n",
".macro bnuctr\n.ifeq $NARG-1\n bcctr\\0 4,4*(\\1)+3\n"
".else\n bcctr\\0 4,3\n.endif\n.endm\n",
".macro bltl\n.ifeq $NARG-1\n bcl\\0 12,0,\\1\n.else\n"
"bcl\\0 12,4*(\\1)+0,\\2\n.endif\n.endm\n",
".macro blel\n.ifeq $NARG-1\n bcl\\0 4,1,\\1\n.else\n"
"bcl\\0 4,4*(\\1)+1,\\2\n.endif\n.endm\n",
".macro beql\n.ifeq $NARG-1\n bcl\\0 12,2,\\1\n.else\n"
"bcl\\0 12,4*(\\1)+2,\\2\n.endif\n.endm\n",
".macro bgel\n.ifeq $NARG-1\n bcl\\0 4,0,\\1\n.else\n"
"bcl\\0 4,4*(\\1)+0,\\2\n.endif\n.endm\n",
".macro bgtl\n.ifeq $NARG-1\n bcl\\0 12,1,\\1\n.else\n"
"bcl\\0 12,4*(\\1)+1,\\2\n.endif\n.endm\n",
".macro bnll\n.ifeq $NARG-1\n bcl\\0 4,0,\\1\n.else\n"
"bcl\\0 4,4*(\\1)+0,\\2\n.endif\n.endm\n",
".macro bnel\n.ifeq $NARG-1\n bcl\\0 4,2,\\1\n.else\n"
"bcl\\0 4,4*(\\1)+2,\\2\n.endif\n.endm\n",
".macro bngl\n.ifeq $NARG-1\n bcl\\0 4,1,\\1\n.else\n"
"bcl\\0 4,4*(\\1)+1,\\2\n.endif\n.endm\n",
".macro bsol\n.ifeq $NARG-1\n bcl\\0 12,3,\\1\n.else\n"
"bcl\\0 12,4*(\\1)+3,\\2\n.endif\n.endm\n",
".macro bnsl\n.ifeq $NARG-1\n bcl\\0 4,3,\\1\n.else\n"
"bcl\\0 4,4*(\\1)+3,\\2\n.endif\n.endm\n",
".macro bunl\n.ifeq $NARG-1\n bcl\\0 12,3,\\1\n.else\n"
"bcl\\0 12,4*(\\1)+3,\\2\n.endif\n.endm\n",
".macro bnul\n.ifeq $NARG-1\n bcl\\0 4,3,\\1\n.else\n"
"bcl\\0 4,4*(\\1)+3,\\2\n.endif\n.endm\n",
".macro bltla\n.ifeq $NARG-1\n bcla\\0 12,0,\\1\n.else\n"
"bcla\\0 12,4*(\\1)+0,\\2\n.endif\n.endm\n",
".macro blela\n.ifeq $NARG-1\n bcla\\0 4,1,\\1\n.else\n"
"bcla\\0 4,4*(\\1)+1,\\2\n.endif\n.endm\n",
".macro beqla\n.ifeq $NARG-1\n bcla\\0 12,2,\\1\n.else\n"
"bcla\\0 12,4*(\\1)+2,\\2\n.endif\n.endm\n",
".macro bgela\n.ifeq $NARG-1\n bcla\\0 4,0,\\1\n.else\n"
"bcla\\0 4,4*(\\1)+0,\\2\n.endif\n.endm\n",
".macro bgtla\n.ifeq $NARG-1\n bcla\\0 12,1,\\1\n.else\n"
"bcla\\0 12,4*(\\1)+1,\\2\n.endif\n.endm\n",
".macro bnlla\n.ifeq $NARG-1\n bcla\\0 4,0,\\1\n.else\n"
"bcla\\0 4,4*(\\1)+0,\\2\n.endif\n.endm\n",
".macro bnela\n.ifeq $NARG-1\n bcla\\0 4,2,\\1\n.else\n"
"bcla\\0 4,4*(\\1)+2,\\2\n.endif\n.endm\n",
".macro bngla\n.ifeq $NARG-1\n bcla\\0 4,1,\\1\n.else\n"
"bcla\\0 4,4*(\\1)+1,\\2\n.endif\n.endm\n",
".macro bsola\n.ifeq $NARG-1\n bcla\\0 12,3,\\1\n.else\n"
"bcla\\0 12,4*(\\1)+3,\\2\n.endif\n.endm\n",
".macro bnsla\n.ifeq $NARG-1\n bcla\\0 4,3,\\1\n.else\n"
"bcla\\0 4,4*(\\1)+3,\\2\n.endif\n.endm\n",
".macro bunla\n.ifeq $NARG-1\n bcla\\0 12,3,\\1\n.else\n"
"bcla\\0 12,4*(\\1)+3,\\2\n.endif\n.endm\n",
".macro bnula\n.ifeq $NARG-1\n bcla\\0 4,3,\\1\n.else\n"
"bcla\\0 4,4*(\\1)+3,\\2\n.endif\n.endm\n",
".macro bltlrl\n.ifeq $NARG-1\n bclrl\\0 12,4*(\\1)+0\n"
".else\n bclrl\\0 12,0\n.endif\n.endm\n",
".macro blelrl\n.ifeq $NARG-1\n bclrl\\0 4,4*(\\1)+1\n"
".else\n bclrl\\0 4,1\n.endif\n.endm\n",
".macro beqlrl\n.ifeq $NARG-1\n bclrl\\0 12,4*(\\1)+2\n"
".else\n bclrl\\0 12,2\n.endif\n.endm\n",
".macro bgelrl\n.ifeq $NARG-1\n bclrl\\0 4,4*(\\1)+0\n"
".else\n bclrl\\0 4,0\n.endif\n.endm\n",
".macro bgtlrl\n.ifeq $NARG-1\n bclrl\\0 12,4*(\\1)+1\n"
".else\n bclrl\\0 12,1\n.endif\n.endm\n",
".macro bnllrl\n.ifeq $NARG-1\n bclrl\\0 4,4*(\\1)+0\n"
".else\n bclrl\\0 4,0\n.endif\n.endm\n",
".macro bnelrl\n.ifeq $NARG-1\n bclrl\\0 4,4*(\\1)+2\n"
".else\n bclrl\\0 4,2\n.endif\n.endm\n",
".macro bnglrl\n.ifeq $NARG-1\n bclrl\\0 4,4*(\\1)+1\n"
".else\n bclrl\\0 4,1\n.endif\n.endm\n",
".macro bsolrl\n.ifeq $NARG-1\n bclrl\\0 12,4*(\\1)+3\n"
".else\n bclrl\\0 12,3\n.endif\n.endm\n",
".macro bnslrl\n.ifeq $NARG-1\n bclrl\\0 4,4*(\\1)+3\n"
".else\n bclrl\\0 4,3\n.endif\n.endm\n",
".macro bunlrl\n.ifeq $NARG-1\n bclrl\\0 12,4*(\\1)+3\n"
".else\n bclrl\\0 12,3\n.endif\n.endm\n",
".macro bnulrl\n.ifeq $NARG-1\n bclrl\\0 4,4*(\\1)+3\n"
".else\n bclrl\\0 4,3\n.endif\n.endm\n",
".macro bltctrl\n.ifeq $NARG-1\n bcctrl\\0 12,4*(\\1)+0\n"
".else\n bcctrl\\0 12,0\n.endif\n.endm\n",
".macro blectrl\n.ifeq $NARG-1\n bcctrl\\0 4,4*(\\1)+1\n"
".else\n bcctrl\\0 4,1\n.endif\n.endm\n",
".macro beqctrl\n.ifeq $NARG-1\n bcctrl\\0 12,4*(\\1)+2\n"
".else\n bcctrl\\0 12,2\n.endif\n.endm\n",
".macro bgectrl\n.ifeq $NARG-1\n bcctrl\\0 4,4*(\\1)+0\n"
".else\n bcctrl\\0 4,0\n.endif\n.endm\n",
".macro bgtctrl\n.ifeq $NARG-1\n bcctrl\\0 12,4*(\\1)+1\n"
".else\n bcctrl\\0 12,1\n.endif\n.endm\n",
".macro bnlctrl\n.ifeq $NARG-1\n bcctrl\\0 4,4*(\\1)+0\n"
".else\n bcctrl\\0 4,0\n.endif\n.endm\n",
".macro bnectrl\n.ifeq $NARG-1\n bcctrl\\0 4,4*(\\1)+2\n"
".else\n bcctrl\\0 4,2\n.endif\n.endm\n",
".macro bngctrl\n.ifeq $NARG-1\n bcctrl\\0 4,4*(\\1)+1\n"
".else\n bcctrl\\0 4,1\n.endif\n.endm\n",
".macro bsoctrl\n.ifeq $NARG-1\n bcctrl\\0 12,4*(\\1)+3\n"
".else\n bcctrl\\0 12,3\n.endif\n.endm\n",
".macro bnsctrl\n.ifeq $NARG-1\n bcctrl\\0 4,4*(\\1)+3\n"
".else\n bcctrl\\0 4,3\n.endif\n.endm\n",
".macro bunctrl\n.ifeq $NARG-1\n bcctrl\\0 12,4*(\\1)+3\n"
".else\n bcctrl\\0 12,3\n.endif\n.endm\n",
".macro bnuctrl\n.ifeq $NARG-1\n bcctrl\\0 4,4*(\\1)+3\n"
".else\n bcctrl\\0 4,3\n.endif\n.endm\n",
".macro crset\n creqv \\1,\\1,\\1\n.endm\n",
".macro crclr\n crxor \\1,\\1,\\1\n.endm\n",
".macro crmove\n cror \\1,\\2,\\2\n.endm\n",
".macro crnot\n crnor \\1,\\2,\\2\n.endm\n",
".macro trap\n tw 31,0,0\n.endm\n",
".macro twlt\n tw 16,\\1,\\2\n.endm\n",
".macro twle\n tw 20,\\1,\\2\n.endm\n",
".macro tweq\n tw 4,\\1,\\2\n.endm\n",
".macro twge\n tw 12,\\1,\\2\n.endm\n",
".macro twgt\n tw 8,\\1,\\2\n.endm\n",
".macro twnl\n tw 12,\\1,\\2\n.endm\n",
".macro twne\n tw 24,\\1,\\2\n.endm\n",
".macro twng\n tw 20,\\1,\\2\n.endm\n",
".macro twllt\n tw 2,\\1,\\2\n.endm\n",
".macro twlle\n tw 6,\\1,\\2\n.endm\n",
".macro twlge\n tw 5,\\1,\\2\n.endm\n",
".macro twlgt\n tw 1,\\1,\\2\n.endm\n",
".macro twlnl\n tw 5,\\1,\\2\n.endm\n",
".macro twlng\n tw 6,\\1,\\2\n.endm\n",
".macro twlti\n twi 16,\\1,\\2\n.endm\n",
".macro twlei\n twi 20,\\1,\\2\n.endm\n",
".macro tweqi\n twi 4,\\1,\\2\n.endm\n",
".macro twgei\n twi 12,\\1,\\2\n.endm\n",
".macro twgti\n twi 8,\\1,\\2\n.endm\n",
".macro twnli\n twi 12,\\1,\\2\n.endm\n",
".macro twnei\n twi 24,\\1,\\2\n.endm\n",
".macro twngi\n twi 20,\\1,\\2\n.endm\n",
".macro twllti\n twi 2,\\1,\\2\n.endm\n",
".macro twllei\n twi 6,\\1,\\2\n.endm\n",
".macro twlgei\n twi 5,\\1,\\2\n.endm\n",
".macro twlgti\n twi 1,\\1,\\2\n.endm\n",
".macro twlnli\n twi 5,\\1,\\2\n.endm\n",
".macro twlngi\n twi 6,\\1,\\2\n.endm\n",
".macro tdlt\n td 16,\\1,\\2\n.endm\n",
".macro tdle\n td 20,\\1,\\2\n.endm\n",
".macro tdeq\n td 4,\\1,\\2\n.endm\n",
".macro tdge\n td 12,\\1,\\2\n.endm\n",
".macro tdgt\n td 8,\\1,\\2\n.endm\n",
".macro tdnl\n td 12,\\1,\\2\n.endm\n",
".macro tdne\n td 24,\\1,\\2\n.endm\n",
".macro tdng\n td 20,\\1,\\2\n.endm\n",
".macro tdllt\n td 2,\\1,\\2\n.endm\n",
".macro tdlle\n td 6,\\1,\\2\n.endm\n",
".macro tdlge\n td 5,\\1,\\2\n.endm\n",
".macro tdlgt\n td 1,\\1,\\2\n.endm\n",
".macro tdlnl\n td 5,\\1,\\2\n.endm\n",
".macro tdlng\n td 6,\\1,\\2\n.endm\n",
".macro tdlti\n tdi 16,\\1,\\2\n.endm\n",
".macro tdlei\n tdi 20,\\1,\\2\n.endm\n",
".macro tdeqi\n tdi 4,\\1,\\2\n.endm\n",
".macro tdgei\n tdi 12,\\1,\\2\n.endm\n",
".macro tdgti\n tdi 8,\\1,\\2\n.endm\n",
".macro tdnli\n tdi 12,\\1,\\2\n.endm\n",
".macro tdnei\n tdi 24,\\1,\\2\n.endm\n",
".macro tdngi\n tdi 20,\\1,\\2\n.endm\n",
".macro tdllti\n tdi 2,\\1,\\2\n.endm\n",
".macro tdllei\n tdi 6,\\1,\\2\n.endm\n",
".macro tdlgei\n tdi 5,\\1,\\2\n.endm\n",
".macro tdlgti\n tdi 1,\\1,\\2\n.endm\n",
".macro tdlnli\n tdi 5,\\1,\\2\n.endm\n",
".macro tdlngi\n tdi 6,\\1,\\2\n.endm\n",
".macro mtxer\n mtspr 1,\\1\n.endm\n",
".macro mtlr\n mtspr 8,\\1\n.endm\n",
".macro mtctr\n mtspr 9,\\1\n.endm\n",
".macro mtdsisr\n mtspr 18,\\1\n.endm\n",
".macro mtdar\n mtspr 19,\\1\n.endm\n",
".macro mtdec\n mtspr 22,\\1\n.endm\n",
".macro mtsdr1\n mtspr 25,\\1\n.endm\n",
".macro mtsrr0\n mtspr 26,\\1\n.endm\n",
".macro mtsrr1\n mtspr 27,\\1\n.endm\n",
".macro mtsprg\n mtspr 272+(\\1),\\2\n.endm\n",
".macro mtasr\n mtspr 280,\\1\n.endm\n",
".macro mtear\n mtspr 282,\\1\n.endm\n",
".macro mttbl\n mtspr 284,\\1\n.endm\n",
".macro mttbu\n mtspr 285,\\1\n.endm\n",
".macro mtibatu\n mtspr 528+2*(\\1),\\2\n.endm\n",
".macro mtibatl\n mtspr 529+2*(\\1),\\2\n.endm\n",
".macro mtdbatu\n mtspr 536+2*(\\1),\\2\n.endm\n",
".macro mtdbatl\n mtspr 537+2*(\\1),\\2\n.endm\n",
".macro mtdabr\n mtspr 1013,\\1\n.endm\n",
".macro mfxer\n mfspr \\1,1\n.endm\n",
".macro mflr\n mfspr \\1,8\n.endm\n",
".macro mfctr\n mfspr \\1,9\n.endm\n",
".macro mfdsisr\n mfspr \\1,18\n.endm\n",
".macro mfdar\n mfspr \\1,19\n.endm\n",
".macro mfdec\n mfspr 22,\\1\n.endm\n",
".macro mfsdr1\n mfspr \\1,25\n.endm\n",
".macro mfsrr0\n mfspr \\1,26\n.endm\n",
".macro mfsrr1\n mfspr \\1,27\n.endm\n",
".macro mfsprg\n mfspr \\1,272+(\\2)\n.endm\n",
".macro mfasr\n mfspr \\1,280\n.endm\n",
".macro mfear\n mfspr \\1,282\n.endm\n",
".macro mftbl\n mftb \\1,268\n.endm\n",
".macro mftbu\n mftb \\1,269\n.endm\n",
".macro mfpvr\n mfspr \\1,287\n.endm\n",
".macro mfibatu\n mfspr \\1,528+2*(\\2)\n.endm\n",
".macro mfibatl\n mfspr \\1,529+2*(\\2)\n.endm\n",
".macro mfdbatu\n mfspr \\1,536+2*(\\2)\n.endm\n",
".macro mfdbatl\n mfspr \\1,537+2*(\\2)\n.endm\n",
".macro mfdabr\n mfspr \\1,1013\n.endm\n",
".macro nop\n ori 0,0,0\n.endm\n",
".macro li\n addi \\1,0,\\2\n.endm\n",
".macro lis\n addis \\1,0,\\2\n.endm\n",
".macro mr\n or \\1,\\2,\\2\n.endm\n",
".macro mr.\n or. \\1,\\2,\\2\n.endm\n",
".macro not\n nor \\1,\\2,\\2\n.endm\n",
".macro not.\n nor. \\1,\\2,\\2\n.endm\n",
".macro mtcr\n mtcrf 0xff,\\1\n.endm\n",
0
};